package com.tuocent.dagv2.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.tuocent.dagv2.entity.ArchivesClass;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * <p>
 * 档案分类 Mapper 接口
 * </p>
 *
 * @author Vincent
 * @since 2025-07-31
 */
@Mapper
public interface ArchivesClassMapper extends BaseMapper<ArchivesClass> {
    String getClassDataSQL = "select a.*, b.classify_name, b.filling_model from db_archives_class as a left join db_archives_classify as b " +
            "on a.classify_id=b.id ${ew.customSqlSegment}";

    @Select(getClassDataSQL)
    List<ArchivesClass> getClassData(@Param("ew") Wrapper<ArchivesClass> queryWrapper);

}

